package com.example.makerspace.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.makerspace.mapper.MybatisListHandler;
import io.swagger.models.auth.In;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.ArrayList;
import java.util.List;

/**
 * @author River
 * @version 1.0
 * @date 2023/9/25 15:34
 * @description:
 */

@EqualsAndHashCode(callSuper = true)
@Data
@TableName(value = "t_user",autoResultMap = true)
@Document(indexName = "t_user")
public class UserDO extends BaseDO{
   public final static String ROLE = "role";
   public final static String USERNAME = "username";
   public final static String ACTIVE_STATUS = "1";
   public final static String INACTIVE_STATUS = "0";

   @Field(name = "username", type = FieldType.Text, analyzer="ik_max_word")
   private String nickname;
   private String status;

   @Excel(name = "用户名",width=15)
   @Field(name = "username", type = FieldType.Text, analyzer="ik_max_word")
   private String username;
   private String password;
   private String role;
   @Field(name = "is_authentication", type = FieldType.Text, analyzer="ik_max_word")
   private Integer isAuthentication;
   @Field(name = "authentication_type", type = FieldType.Text, analyzer="ik_max_word")
   private String authenticationType;
   @Field(name="ent_name", type = FieldType.Text, analyzer="ik_max_word")
   private  String entName;
   @Field(name="avatar", type = FieldType.Text, analyzer="ik_max_word")
   private  String  avatar;
   @Field(name="background", type = FieldType.Text, analyzer="ik_max_word")
   private  String   background;
   @Field(name="certification_results", type = FieldType.Text, analyzer="ik_max_word")
   private Integer certificationResults;
   @Field(name="email", type = FieldType.Text, analyzer="ik_max_word")
   private  String email;
   @Field(name="industry", type = FieldType.Text, analyzer="ik_max_word")
   private  String industry;
   @Field(name="headshot", type = FieldType.Text, analyzer="ik_max_word")
   private  String headshot;
   @Field(name="is_show", type = FieldType.Text, analyzer="ik_max_word")
   private  Integer isShow;
   @TableField(typeHandler = MybatisListHandler.class)
   @Field(name="unread_system_message", type = FieldType.Text, analyzer="ik_max_word")
   private List<String> unreadSystemMessage;
   @Field(name="individual", type = FieldType.Text, analyzer="ik_max_word")
   private  String individual;
   @Field(name="is_user_authentication", type = FieldType.Text, analyzer="ik_max_word")
   private  Integer isUserAuthentication;
   @Field(name="is_enterprise_certification", type = FieldType.Text, analyzer="ik_max_word")
   private Integer isEnterpriseCertification;
   @Field(name = "map_address", type = FieldType.Text)
   private  String mapAddress;
   @Field(name = "points", type = FieldType.Text)
   private  Integer points;
   @TableField(typeHandler = MybatisListHandler.class)
   @Field(name = "meetings", type = FieldType.Text)
   private  List<String> meetings;
   @Field(name = "is_expert", type = FieldType.Text)
   private  Integer isExpert;


}
